﻿//-----------------------------------------------------------------------
// <copyright file="StackExtensions.cs" company="SLWY Enterprises">
// * Copyright (C) 2017 四川商旅无忧科技有限公司 版权所有。
// * version : 1.0
// * author  : qinchaoyue
// * FileName: StackExtensions.cs
// * history : created by qinchaoyue 2018-01-23 11:02:06
// </copyright>
//-----------------------------------------------------------------------


using System.Collections.Generic;
using System.Diagnostics.Contracts;

namespace Slwy.Utility.Extensions
{
    public static class StackExtensions
    {
        public static Stack<T> Clone<T>(this Stack<T> stack)
        {
            Contract.Requires(stack != null);
            return new Stack<T>(new Stack<T>(stack));
        }
    }
}
